<template>
	<view>
		<view class="peter-cates">
			<!-- 第一行 -->
			<view class="cates">
				<view @click="cate_list(item ,index)" class="cate-item" v-for="(item, index) in list" :key="index"
					v-if="item.row_state == 0">
					<u--image :src="item.icon" width="80rpx" height="80rpx" :showMenuByLongpress="false">
					</u--image>
					<text>{{ item.name }}</text>
				</view>
			</view>
			<!-- 第二行 -->
			<view class="cates">
				<view @click="cate_list_item(item ,index)" class="cate-item" v-for="(item, index) in list" :key="index"
					v-if="item.row_state == 1">
					<u--image :src="item.icon" width="80rpx" height="80rpx" :showMenuByLongpress="false">
					</u--image>
					<text>{{ item.name }}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {


			}
		},
		props: {
			list: {
				type: Array,
				default: () => ({})
			}
		},
		methods: {
			cate_list(item, index) {
				console.log(item, index)
				switch (index) {
					case 0:
						uni.navigateTo({
							url: '../../pages_points/my_points/points_mall'
						})
						break;
					case 1:
						uni.navigateTo({
							url: '../../page_venues/site/site'
						})
						break;
					case 2:
						uni.navigateTo({
							url: '../../page_venues/ticket/ticket'
						})
						break;
				}

			}
		}
	}
</script>

<style lang="scss" scoped>
	@import url("@/static/css/index/index.css");
</style>